<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{$setting.webname} - 用户列表</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="/public/static/favicon.ico">
    <link href="/public/static/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/public/static/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/public/static/admin/css/animate.css" rel="stylesheet">
    <link href="/public/static/admin/css/style.css?v=4.1.0" rel="stylesheet">
    <style>
        .tool i:hover{
            color:#19a9d5;
        }
    </style>
</head>

<body class="gray-bg">
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-sm-4">
        <h2>用户列表</h2>
        <ol class="breadcrumb">
            <li>
                <a href="{:url('Admins/admin')}">主页</a>
            </li>
            <li>
                <strong>用户列表</strong>
            </li>
        </ol>
    </div>
</div>
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        {foreach $list as $vo}
        <div class="col-sm-12">
            <div class="contact-box">
                <a>
                    <div class="col-sm-1">
                        <div class="text-center">
                            <img alt="image" class="img-circle m-t-xs img-responsive" src="{$vo.photo}">
                            <div class="m-t-xs font-bold">{$vo.post}</div>
                            <div class="m-t-xs font-bold">
                                {if condition="$vo.status == '2'"}
                                <span class="label label-danger">已封号</span>
                                {elseif condition="$vo.status == '1'" /}
                                <span class="label label-primary">正常</span>
                                {/if}
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-10">
                        <h3><strong>{$vo.username}</strong></h3>
                        <p><i class="fa fa-map-marker"></i> {$vo.map}</p>
                        <p><i class="fa fa fa-envelope-o"></i> {$vo.email}</p>
                        <p><i class="fa fa-phone"></i> {$vo.phone}</p>
                        <address>
                            注册时间：{$vo.create_time}<br>
                            最后登陆时间：{$vo.login_time|date="Y-m-d H:i:s",###}<br>
                            最后登陆IP：{$vo.login_ip}<br>
                        </address>
                        <strong>用户权限：</strong>
                        {foreach $vo.jurisdiction as $k=>$vs}
                        <strong>【{$vs.title}】</strong>:
                                {foreach $vo.jurisdictiontow[$k] as $ks=>$vvs}
                        「{$vvs.title}」
                                {/foreach}
                        {/foreach}
                        <br>
                    </div>
                    <div class="col-sm-1 tool" style="text-align: right;">
                        <a href="{:url('Admins/update')}?id={$vo.id}"><i class="glyphicon glyphicon-pencil"></i></a>
                        {if condition="$vo.username != $user.username"}<a class="del" data-id="{$vo.id}"><i class="glyphicon glyphicon-trash"></i></a>{/if}
                    </div>
                    <div class="clearfix"></div>
                </a>
            </div>
        </div>
        {/foreach}
    </div>
</div>

<!-- 全局js -->
<script src="/public/static/admin/js/jquery.min.js?v=2.1.4"></script>
<script src="/public/static/admin/js/bootstrap.min.js?v=3.3.6"></script>



<!-- 自定义js -->
<script src="/public/static/admin/js/content.js?v=1.0.0"></script>
<!-- layui-->
<script src="/public/static/admin/layui/layui.js"></script>
<script>
    layui.use('layer', function(){ //独立版的layer无需执行这一句
        var $ = layui.jquery, layer = layui.layer; //独立版的layer无需执行这一句
        //点击提交
        $(".del").click(function(){
            var s = $(this);
            top.layer.msg('你确定要删除吗？', {
                time: 20000, //20s后自动关闭
                shade: 0.8,
                btn: ['确定', '取消'],
                btn1:function(){
                    $.post("{:url('Admins/deletes')}",{id:s.attr('data-id')},function(data){
                        top.layer.closeAll();
                        top.layer.msg(data.msg,{time:2000,shade:0.5},function(){
                            if(data.url){
                                window.location.href = data.url;
                            }
                        });
                    });
                }
            });

        });
    });
</script>


<script>
    // $(document).ready(function () {
    //     $('.contact-box').each(function () {
    //         animationHover(this, 'pulse');
    //     });
    // });
</script>




</body>

</html>
